import React from 'react';
import Header from '../../components/Header'
import { useParams, useLocation } from 'react-router-dom'
const Index = () => {

  // useParams 是用来获取通过 url 传递的参数
  const params = useParams()
  console.log(params);

  // 获取通过 state 传递的参数
  const location = useLocation()
  console.log(location.state);
  return (
    <div className='box'>
      <Header title='详情' />
      <div className='content'>

        内容
      </div>
    </div>
  );
};

export default Index;
